package com.trkj.controller;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;


import com.trkj.pojos.JlAlarmRegister;
import com.trkj.pojos.JlCheckPay;
import com.trkj.pojos.JlCheckProject;
import com.trkj.pojos.JlCheckResult;
import com.trkj.pojos.JlElectronicePrint;
import com.trkj.pojos.JlExamineApply;
import com.trkj.pojos.JlIccard;
import com.trkj.pojos.JlRecipePay;
import com.trkj.pojos.JlRegistration;
import com.trkj.pojos.Tbdepartment;
import com.trkj.pojos.Tbstaff;
import com.trkj.pojos.YzrPharStock;
import com.trkj.service.CcHospapplyService;
import com.trkj.service.JlCaseService;
import com.trkj.service.JlCheckResulService;
import com.trkj.service.JlDoctorAdviceService;
import com.trkj.service.JlExamineApplyService;
import com.trkj.service.JlIccardService;
import com.trkj.service.JlJlCheckPayService;
import com.trkj.service.JlJlElectronicePrintService;
import com.trkj.service.JlRecipePayService;
import com.trkj.service.JlRecipeService;
import com.trkj.service.JlTbschedulingService;
import com.trkj.service.JlTbstaffService;
import com.trkj.service.JlUseYzrPharStockService;
import com.trkj.service.JlalarmService;
import com.trkj.service.JlcheckprojectService;
import com.trkj.service.JldepartmentService;
import com.trkj.service.JlregistrationService;
import com.trkj.vo.Result;


@Controller
public class JlController {
	@Autowired
	private JlIccardService iccardService;
	@Autowired
	private JlregistrationService registrationService;
	@Autowired
	private JlCaseService CaseService;
	@Autowired
	private JlalarmService alarmService;
	@Autowired 
	private JlExamineApplyService ExamineApplyService;
	@Autowired 
	private JlcheckprojectService checkprojectService;
	@Autowired 
	private JlCheckResulService CheckResulService;
	@Autowired
	private JldepartmentService departmentService;
	@Autowired 
	private JlTbschedulingService schedulingService;
	@Autowired
	private JlTbstaffService taffService;
	@Autowired  
	private JlJlCheckPayService CheckPayService;
	@Autowired  
	private JlJlElectronicePrintService ElectronicePrintService;
	@Autowired 
	private JlUseYzrPharStockService PharStockService;
	@Autowired  
	private JlRecipeService RecipeService;
	@Autowired  
	private JlRecipePayService RecipePayService;
	@Autowired  
	private CcHospapplyService HospapplyService;
	@Autowired  
	private JlDoctorAdviceService DoctorAdviceService;
	
	
	@RequestMapping("/tojl_IdToExamineApply")
    public ModelAndView test2(ModelAndView modelAndView ,BigDecimal ieId){
        modelAndView.setViewName("jl_IdToExamineApply");
        modelAndView.addObject("ieId", ieId);
        return  modelAndView;       
    }
	
	@RequestMapping("/tojl_index")
	public String toindex(){
		return "jl_index";
	}
	@RequestMapping("/tojl_IcManagement")
	public String toIcManagement(){
		return "jl_IcManagement";
	}
	@RequestMapping("/addIc")
	public @ResponseBody Result addIccard(JlIccard Iccard){
		iccardService.addIcCard(Iccard);
		return new Result(true, "用户："+Iccard.getIName()+"注册成功");
	}
	@RequestMapping("/topage")
	public @ResponseBody Map<String, Object> pageAll(int page,int rows){
		 return iccardService.queryStusByPage(page, rows);
	}
	//根据卡号查看员工信息分页
	@RequestMapping("/toicTopage")
	public @ResponseBody Map<String, Object> icTopageAll(int page,int rows,BigDecimal chid){
		 return iccardService.queryicTopage(page, rows,chid);
	}
	@RequestMapping("/deliccard")
	public @ResponseBody Result delStu(Long[] list){
		iccardService.delStu(list);
		return new Result(true, "删除成功");
	}
	@RequestMapping("/findbySex")
	public @ResponseBody List<JlIccard> findbySex(String sex){	
		return iccardService.findbySex(sex);
	}
	@RequestMapping("/findbyname")
	public @ResponseBody List<JlIccard> findbyname(String sex){	
		return iccardService.findbyname(sex);
	}
	@RequestMapping("/findbySaddress")
	public @ResponseBody List<JlIccard> findbySaddress(String sex){	
		return iccardService.findbyaddres(sex);
	}
	@RequestMapping("/findbyiccard")
	public @ResponseBody List<JlIccard> findbyiccard(String sex){
		return iccardService.findbyiccar(sex);
	}
	//返回最大的id号
	@RequestMapping("/findMaxStuByPage")
	public @ResponseBody Long findMaxStuByPage(){
		return iccardService.findMaxStuByPage();
	}
	//返回最大的id号
	@RequestMapping("/to_findbyid")
	public @ResponseBody Long findbyid(String idcard){
		return iccardService.findbyid(idcard);
	}
	//根据卡号查找用户姓名
	@RequestMapping("/to_findbyname")
	public @ResponseBody String findbyid(Long iId){
		return iccardService.findbyname(iId);
	}
	//根据用户姓名查找卡号
	@RequestMapping("/to_nametoic")
	public @ResponseBody Long nametoic(String name){
		return iccardService.nametoic(name);
	}
	//根据身份证号查找卡号
	@RequestMapping("/to_iccardtoic")
	public @ResponseBody Long iccardtoic(String iIdentityCard){
		return iccardService.iccardtoic(iIdentityCard);
	}
	//根据卡号查找对象
	@RequestMapping("/to_icnumtoic")
	public @ResponseBody  JlIccard  icnumtoic(Long icnum){
		return iccardService.icnumtoic(icnum);
	}
	//显示员工信息
	@RequestMapping("/toshow_icInfo")
	public String show_icInfo(){
		return "Jl_show_icInfo";
	}
	
	
	/*
	 * 下面是挂号部分
	 */
	
	@RequestMapping("/tojl_registration")
	public String findbyregistration(){	
		return "jl_registration";
	}
	@RequestMapping("/icregic")
	public @ResponseBody List<JlIccard> findbyiccard(long reginid){	
		return iccardService.findbyregic(reginid);
	}
	@RequestMapping("/toreginpage")
	public @ResponseBody Map<String, Object> reginpageAll(int page,int rows){
		 return registrationService.queryreginByPage(page, rows);
	}
	@RequestMapping("/addregin")
	public @ResponseBody Result addregin(JlRegistration Registration){
		registrationService.addregin(Registration);
		return new Result(true, "操作成功");
	}
	@RequestMapping("/delregin")
	public @ResponseBody Result delregin(Long[] list){
		registrationService.delregin(list);
		return new Result(true, "删除成功");
	}
	
	@RequestMapping("/findbyreks")
	public @ResponseBody List<JlRegistration> findbyreks(String price){	
		return registrationService.findbyreks(price);
	}
	@RequestMapping("/findbyreys")
	public @ResponseBody List<JlRegistration> findbyreys(String price){	
		return registrationService.findbyreys(price);
	}
	@RequestMapping("/findbyrefs")
	public @ResponseBody List<JlRegistration> findbyrefs(String price){	
		return registrationService.findbyrefs(price);
	}
	@RequestMapping("/findbyrejf")
	public @ResponseBody List<JlRegistration> findbyrejf(String price){	
		return registrationService.findbyrejf(price);
	}
	//返回最大的日期
	@RequestMapping("/findMaxregtimByPage")
	public @ResponseBody Date findMaxregtimByPage(){
		return registrationService.findMaxregtimByPage();
	} 
	//返回最大的呼叫号
	@RequestMapping("/findMaxreghjhByPage")
	public @ResponseBody BigDecimal findMaxreghjhByPage(){
		return registrationService.findMaxreghjhByPage();
	}
	//返回最小的呼叫号
	@RequestMapping("/findminreghjhByPage")
	public @ResponseBody BigDecimal findminreghjhByPage(){
		return registrationService.findminreghjhByPage();
	}
	//根据呼叫号查询卡号
	@RequestMapping("/to_findbyIreId")
	public @ResponseBody BigDecimal findminreghjhByPage(BigDecimal callnum){
		return registrationService.findbyIreId(callnum);
	}
	//返回最小的呼叫号的对象
	@RequestMapping("/to_findbyregin")
	public @ResponseBody JlRegistration  findbyregin(BigDecimal callnum){	
		return registrationService.findbyregin(callnum);
	}
	
	
	/*
	 * 下面是病例部分
	 */
	@RequestMapping("/tojl_case")
	public String findbycase(){	
		return "jl_case";
	}
	@RequestMapping("/tocasepage")
	public @ResponseBody Map<String, Object> casepageAll(int page,int rows,Long price){
		 return CaseService.queryreginByPage(page, rows, price);
	}

	/*
	 * 下面是报警部分
	 */
	@RequestMapping("/tojl_alarm")
	public String findbyalarm(){	
		return "jl_alarm";
	}
	@RequestMapping("/toalarmpage")
	public @ResponseBody Map<String, Object> alarmpageAll(int page,int rows){
		 return alarmService.queryalarmByPage(page, rows);
	}
	@RequestMapping("/addalarm")
	public @ResponseBody Result addalarm(JlAlarmRegister AlarmRegister){
		alarmService.addalarm(AlarmRegister);
		return new Result(true, "操作成功");
	}
	@RequestMapping("/delalarm")
	public @ResponseBody Result delalarm(Long[] list){
		alarmService.delregin(list);
		return new Result(true, "删除成功");
	}  
	
	@RequestMapping("/findbyhwy")
	public @ResponseBody List<JlAlarmRegister> findbyhwy(String price){	
		return alarmService.findbyhwy(price);
	}
	@RequestMapping("/findbybjrm")
	public @ResponseBody List<JlAlarmRegister> findbybjrm(String price){	
		return alarmService.findbybjrm(price);
	}
	/*
	 * 下面是就诊管理
	 */
	@RequestMapping("/tojl_seeDoctor")
	public String findbyseeDoctor(){	
		return "jl_seeDoctor";
	}
	@RequestMapping("/tojl_diagnose_case")
	public String findbydiagnose_case(){	
		return "jl_diagnose_case";
	}
	/*
	 * 下面是呼叫管理
	 */
	@RequestMapping("/tojl_call")
	public String findbycall(){	
		return "jl_call";
	}
	/*
	 * 下面是检查科目管理
	 */
	@RequestMapping("/tojl_checkproject")
	public String findcheckproject(){	
		return "jl_checkproject";
	}
	@RequestMapping("/tocheckprojectpage")
	public @ResponseBody Map<String, Object> checkprojectAll(int page,int rows){
		 return checkprojectService.finCheckProjectpage(page, rows);
	} 
	@RequestMapping("/tocheckprojectqueryAll")
	public@ResponseBody List<JlCheckProject> queryAll(){
		 return checkprojectService.queryAll();
	} 
	//根据项目种类查看检查项目详情
	@RequestMapping("/tocheckProjKind")
	public @ResponseBody List<JlCheckProject> checkProjKind(String kind){		
		return checkprojectService.checkProjKind(kind);
	}
	//根据项目名字查看检查项目详情
	@RequestMapping("/tocheckProjPJ")
	public @ResponseBody List<JlCheckProject> checkProjPJ(String price){	
		return checkprojectService.checkProjPJ(price);
	}
	//添加检查科目
	@RequestMapping("/toaddCheckProject")
	public @ResponseBody Result addCheckProject(JlCheckProject CheckProject){
		checkprojectService.addCheckProject(CheckProject);
		return new Result(true, "操作成功");
	}
	//根据检查科目名字返回检查科目的价钱
	@RequestMapping("/tocheckmoney")
	public @ResponseBody BigDecimal checkmoney(String cprProject){	
		return checkprojectService.checkmoney(cprProject);
	}
	/*
	 * 下面是检查管理
	 */
	@RequestMapping("/tojl_checkManage")
	public String findcheckManage(){	
		return "jl_checkManage";
	}
	/*
	 * 下面是申请检查
	 */
	//分页显示所有申请记录
	@RequestMapping("/to_ExamineApplypage")
	public @ResponseBody Map<String, Object> ExamineApplypageAll(int page,int rows){
		 return ExamineApplyService.finExamineApplypage(page, rows);
	}
	//根据卡号分页显示所有申请记录
	@RequestMapping("/to_ic_ExamineApplypage")
	public @ResponseBody Map<String, Object> ic_ExamineApplypageAll(int page,int rows,BigDecimal Id){
			return ExamineApplyService.finic_ExamineApplypage(page, rows,Id);
	}
	//根据科室名分页显示所有申请记录
	@RequestMapping("/to_ExamineApplypage_byOfficeName")
	public @ResponseBody Map<String, Object> ExamineApplypageByNameAll(int page,int rows,String officeName){
			return ExamineApplyService.finExamineApplypage_byOfficeName(page, rows,officeName);
	}
	//分页显示所有未完成检查的申请记录
	@RequestMapping("/to_ExamineApplypageing")
	public @ResponseBody Map<String, Object> ExamineApplypageingAll(int page,int rows){
		 return ExamineApplyService.finExamineApplypageing(page, rows);
	}
	@RequestMapping("/tojl_JlExamineApply")
	public String findJlExamineApply(){	
		return "jl_JlExamineApply";
	}
	@RequestMapping("/addExamineApply")
	public @ResponseBody Result addExamineApply(JlExamineApply ExamineApply){
		ExamineApplyService.addExamineApply(ExamineApply);
		return new Result(true, "操作成功");
	}
	@RequestMapping("/tomaxExamineApply")
	public @ResponseBody Long maxExamineApply(){
		return ExamineApplyService.maxExamineApply();
	}
	//根据id查找申请记录
	@RequestMapping("/icidtoexamineapply")
	public @ResponseBody List<JlExamineApply> icidtoexamineapply(BigDecimal ieId){	
		return ExamineApplyService.icidtoexamineapply(ieId);
	}
	//根据科室名查找申请记录
	@RequestMapping("/pidtoexamineapply")
	public @ResponseBody List<JlExamineApply> pidtoexamineapply(String pid){
		return ExamineApplyService.pidtoexamineapply(pid);
	}

	
	/*
	 * 下面是收费
	 */
	@RequestMapping("/tojl_rechargeable")
	public String findAllRechargeable(){	
		return "jl_rechargeable";
	}
	/*
	 * 下面是开始收费详情
	 */
	@RequestMapping("/tojl_begin_charge")
	public String findbegin_charge(){	
		return "jl_begin_charge";
	}
	/*
	 * 下面是id到申请检查
	 */
	@RequestMapping("/tojl_icTopage")
    public ModelAndView test6(ModelAndView modelAndView ,BigDecimal ieId){
        modelAndView.setViewName("Jl_show_icInfo");
        modelAndView.addObject("ieId", ieId);
        return  modelAndView;       
    }
	/*
	 * 下面是科室编号到申请检查
	 */
	@RequestMapping("/tojl_PidToExamineApply")
    public ModelAndView test3(ModelAndView modelAndView ,String pid){
        modelAndView.setViewName("jl_IdToExamineApply");
        modelAndView.addObject("pid", pid);
        return  modelAndView;       
    }
	/*
	 * 下面是检查结果
	 */
	@RequestMapping("/to_addJlCheckResult")
	public @ResponseBody Result addJlCheckResult(JlCheckResult s){
		CheckResulService.addJlCheckResult(s);
		return new Result(true, "操作成功");
	}
    /*
	 * 下面是部门
	 */
	@RequestMapping("/tojl_department")
	public String finddepartment(){			
		return "jl_department";
	}
	//根据类别查看部门信息
	@RequestMapping("/to_usefindALLdepartment")
	public @ResponseBody List<Tbdepartment> usefindALLdepartment(String king){	
		return departmentService.usefindALLdepartment(king);
	}
	//根据部门编号查看部门信息
	@RequestMapping("/to_idTofindALLdepartment")
	public @ResponseBody List<Tbdepartment> idTofindALLdepartment(Long bmid){	
		return departmentService.idTofindALLdepartment(bmid);
	}
	//根据部门名字查看部门信息
	@RequestMapping("/to_nameTofindALLdepartment")
	public @ResponseBody List<Tbdepartment> nameTofindALLdepartment(String departmentName){	
		return departmentService.nameTofindALLdepartment(departmentName);
	}
	//查看所有的部门
	@RequestMapping("/to_findALLdepartment")
	public @ResponseBody List<Tbdepartment> findALLdepartment(){	
		return departmentService.findALLdepartment();
	}
	
   /*
	* 下面是排班
	*/
	//根据部门编号查看排班表员工编号信息
	@RequestMapping("/to_usefindALLTbscheduling")
	public @ResponseBody BigDecimal usefindALLTbscheduling(long padno){	
		return schedulingService.usefindALLTbscheduling(padno);
	}
	/*
	* 下面是员工
	*/
	//根据部门编号查看排班表员工信息
	@RequestMapping("/to_useFindNameTbstaff")
	public @ResponseBody List<Tbstaff> useFindNameTbstaff(long staffNo){	
		return taffService.useFindNameTbstaff(staffNo);
		
	} 
	//根据员工编号查看员工信息
	@RequestMapping("/to_useygidToTbstaff")
	public @ResponseBody List<Tbstaff> useygidToTbstaff(long staffNo){	
		return taffService.useygidToTbstaff(staffNo);
			
	} 
	//根据员工姓名查看员工信息
	@RequestMapping("/to_useygnameToTbstaff")
	public @ResponseBody List<Tbstaff> useygnameToTbstaff(String staffName){	
		return taffService.useygnameToTbstaff(staffName);
				
	} 
	//根据部门编号查看员工信息
	@RequestMapping("/to_bmidToTbstaff")
	public @ResponseBody List<Tbstaff> bmidToTbstaff(BigDecimal departmentNo){	
		return taffService.bmidToTbstaff(departmentNo);
					
	} 
	//查找所有的员工
	@RequestMapping("/to_Tbstaffpageing")
	public @ResponseBody Map<String, Object> taffServicepageingAll(int page,int rows){
		 return taffService.finTbstaffpageing(page, rows);
	}
	@RequestMapping("/to_Tbstaff")
	public @ResponseBody  List<Tbstaff> taffServiceAll(){
		 return taffService.finTbstaff();
	}
	//根据id返回员工信息
	@RequestMapping("/to_idToTbstaff")
	public @ResponseBody  List<Tbstaff> idToTbstaffAll(Long staffNo){
		 return taffService.idToTbstaff(staffNo);
	}
	
	/*
	* 下面是检查收费
	*/
	@RequestMapping("/to_JlCheckPaypage")
	public @ResponseBody Map<String, Object> CheckPaypageAll(int page,int rows){
		 return CheckPayService.finCheckPaypage(page, rows);
	}
	//根据卡号返回对象不分页
	@RequestMapping("/to_JlCheckPay")
	public @ResponseBody List<JlCheckPay> icJlCheckPay(BigDecimal irpId){	
		return CheckPayService.icJlCheckPay(irpId);
	}
	//添加检查收费
	@RequestMapping("/to_addJlCheckPaypage")
	public @ResponseBody Result addJlCheckPaypage(String cpFigurePerson, Date cpDate, BigDecimal cpNum,BigDecimal icpId){
		//String cpFigurePerson, Date cpDate, BigDecimal cpNum,BigDecimal icpId
		System.err.println(cpFigurePerson+"--"+cpDate+"--"+cpNum+"--"+icpId);
		CheckPayService.addJlCheckPaypage( cpFigurePerson, cpDate, cpNum,icpId);
		return new Result(true, "操作成功");
	}
	/*
	* 下面是电子处方
	* 
	*/
	@RequestMapping("/tojl_JlElectronicePrint")
	public String findJlElectronicePrint(){			
		return "jl_JlElectronicePrint";
	}
	//添加电子处方总表 信息
	@RequestMapping("/to_addJlElectronicePrint")
	public @ResponseBody Result addJlElectronicePrint( Date erOpenTime, BigDecimal ierId,BigDecimal adviceId ,String erPhysician, String inpectionResult,String state ,BigDecimal rerId){
		ElectronicePrintService.addJlElectronicePrint( erOpenTime, ierId, adviceId,erPhysician, inpectionResult, state,rerId);
		return new Result(true, "操作成功");
	}
	//返回最大的处方号码
	@RequestMapping("/to_findMaxelePritid")
	public @ResponseBody long MaxelePritid(){
		return ElectronicePrintService.findMaxelePritid();
	}
	//根据最大的编号查找当天日期
	@RequestMapping("/to_MaxelePritidToDate")
	public @ResponseBody Date MaxelePritidToDate(Long erId){
		return ElectronicePrintService.MaxelePritidToDate(erId);
	}
	//根据卡号查询电子处方详情(state为未取药)
	@RequestMapping("/to_idToElectronicePrint")
	public @ResponseBody List<JlElectronicePrint> idToElectronicePrint(Long ierId){
		return ElectronicePrintService.idToElectronicePrint(ierId);
	}
	/*
	* 下面是药品信息
	*/
	@RequestMapping("/tojl_findByPharStockMedName")
	public @ResponseBody List<YzrPharStock> findByPharStockMedName(String pharStockMedName){	
		return PharStockService.findByPharStockMedName(pharStockMedName);
	}
	@RequestMapping("/tojl_findByKindtockMedName")
	public @ResponseBody List<YzrPharStock> findByKindtockMedName(String pharStockMedKind){	
		return PharStockService.findByKindtockMedName(pharStockMedKind);
	}
	//显示药品详情页面
	@RequestMapping("/toJl_PharStock")
    public ModelAndView test4(ModelAndView modelAndView ,String pid){
        modelAndView.setViewName("Jl_PharStock");
        modelAndView.addObject("pid", pid);
        return  modelAndView;       
    }
	//跟据种类和药房查找药品详细信息
	@RequestMapping("/toJl_PharStockByKind")
    public ModelAndView test5(ModelAndView modelAndView ,String pharStockMedKind){
        modelAndView.setViewName("Jl_PharStock");
        modelAndView.addObject("pharStockMedKind", pharStockMedKind);
        return  modelAndView;       
    }
	@RequestMapping("/to_PharStockByKindpage")
	public @ResponseBody Map<String, Object> PharStockByKindpageAll(int page,int rows,String pharStockMedKind){
		 return PharStockService.PharStockByKindpage(page, rows,pharStockMedKind);
	}
	@RequestMapping("/to_Jl_search_pill")
    public ModelAndView test6(ModelAndView modelAndView ,String pharStockMedKind){	
        modelAndView.setViewName("Jl_search_pill");
        modelAndView.addObject("pharStockMedKind", pharStockMedKind);
        return  modelAndView;       
    }
	/*
	* 下面是药品详情信息
	*/
	@RequestMapping("/to_addJlRecipe")
	public @ResponseBody Result addJlRecipe(String rGuige, String rName, BigDecimal rNum, BigDecimal rPrice, String rRemark, String rResule, BigDecimal rIcid,BigDecimal epid){
		RecipeService.addJlRecipe(rGuige, rName, rNum, rPrice, rRemark, rResule,rIcid,epid);
		return new Result(true, "操作成功");
	}
	/*
	* 下面是电子处方收费详情信息
	*/
	
	@RequestMapping("/to_JlRecipePayByPage")
	public @ResponseBody Map<String, Object> findJlRecipePayByPageAll(int page,int rows){
		 return RecipePayService.findJlRecipePayByPage(page, rows);
	}
	//添加电子处方总表 信息
	@RequestMapping("/to_addJlRecipe2")
	public  void addJlRecipe( BigDecimal irpId,Date rpDate,String rpFigurePerson ,BigDecimal rpNum){
		if(irpId!=null&& rpDate!=null&&rpFigurePerson!=null  &&rpNum!=null){
			RecipePayService.addJlRecipe2( irpId, rpDate, rpFigurePerson , rpNum);
		}
	}
	//根据卡号返回对象不分页
	@RequestMapping("/to_JlRecipePay")
	public @ResponseBody List<JlRecipePay> icidtoJlRecipePay(BigDecimal irpId){	
		return RecipePayService.icidtoJlRecipePay(irpId);
	}
	/*
	* 下面是申请住院页面JlDoctorAdvice
	*/
	@RequestMapping("/to_Hospapply")
	public @ResponseBody Result addHospapply(Date adate,String haname,String hpsex,String hpremarks,BigDecimal hpofficeid,BigDecimal hmedicalid,BigDecimal hdoctorid){
		HospapplyService.addCcHospapply(adate,haname,hpsex,hpremarks,hpofficeid,hmedicalid,hdoctorid);
		return new Result(true, "操作成功");
	}
	/*
	* 下面是医嘱
	*/
	@RequestMapping("/to_addJlDoctorAdvice")
	public @ResponseBody Result addJlDoctorAdvice(String daKind,String daAdvice){
		DoctorAdviceService.addJlDoctorAdvice(daKind, daAdvice);
		return new Result(true, "添加成功");
	}
	//查找编号最大的医嘱编号
	@RequestMapping("/to_findMaxDoctorAdvice")
	public @ResponseBody long findMaxDoctorAdvice(){
		return DoctorAdviceService.findMaxDoctorAdvice();
	}
}



